home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 333_02 / fs.awk < prev    next >
Text File  |  1989-04-21  |  298b  |  15 lines

  1.  
  2. #  This sample demonstrates the use of the enhanced FS variable to split
  3. #  records on more complicated input files.
  4.  
  5.  
  6. BEGIN        {
  7.         FS  = "[\t ]*(SSN|NAME|TEL):[\t ]*"
  8.         OFS = "\t"
  9.         }
  10.  
  11.         # $1 is empty for each record
  12.         {
  13.         printf "%-20.20s %10s %16s\n", $2, $3, $4
  14.         }
  15.